mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-11-05 00:50:21 +00:00
test(agentcompat): add integration scenarios
Co-authored-by: naiba/CloudCode <hi+cloudcode@nai.ba>
This commit is contained in:
1 parent
b3b3d92895
commit
9af3720bf0
96 files changed
+13091
No files matched your search
@@ -0,0 +1,17 @@
|
||||
//go:build linux
|
||||
|
||||
package scenario
|
||||
|
||||
import (
|
||||
"errors"
|
||||
"net/http"
|
||||
|
||||
"github.com/nezhahq/nezha/integration/agentcompat/internal/fixture"
|
||||
)
|
||||
|
||||
func proveHeldNATRequest(observed fixture.NATEchoRecord, domain, identity string) error {
|
||||
if observed.Method != http.MethodPatch || observed.Path != "/held/"+identity || observed.Host != domain || observed.HeaderValue != identity || string(observed.Body) != "held-body-"+identity || observed.SensitiveHeadersPresent {
|
||||
return errors.New("held NAT request did not match exact protocol proof")
|
||||
}
|
||||
return nil
|
||||
}
|
||||
Reference in new issue
Block a user