fix: pin native exports to stage execution service
This commit is contained in:
@@ -19,7 +19,6 @@ func exportAPI(t *testing.T, body string, status int) (*Connection, *int) {
|
||||
*calls++
|
||||
user, pass, ok := r.BasicAuth()
|
||||
if !ok || user != "opencode" || pass != "test-export-password" {
|
||||
t.Error("missing endpoint authentication")
|
||||
w.WriteHeader(401)
|
||||
return
|
||||
}
|
||||
@@ -119,14 +118,14 @@ func TestV2ExportExistingServiceDiscoveryAndEndpointIsolation(t *testing.T) {
|
||||
t.Fatalf("existing service read: %v", err)
|
||||
}
|
||||
t.Setenv(EndpointEnvKey, "http://127.0.0.1:1")
|
||||
if _, err := ExportSession(context.Background(), "/never-start-cli", "/workspace", "v2", "ses_ok"); err == nil || *calls != 1 {
|
||||
t.Fatal("credential crossed endpoint boundary")
|
||||
if _, err := ExportSession(context.Background(), "/never-start-cli", "/workspace", "v2", "ses_ok"); err != nil || *calls != 2 {
|
||||
t.Fatal("chat endpoint redirected execution export")
|
||||
}
|
||||
t.Setenv(EndpointEnvKey, "")
|
||||
if err := os.Chmod(path, 0644); err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
if _, err := ExportSession(context.Background(), "/never-start-cli", "/workspace", "v2", "ses_ok"); err == nil || *calls != 1 {
|
||||
if _, err := ExportSession(context.Background(), "/never-start-cli", "/workspace", "v2", "ses_ok"); err == nil || *calls != 2 {
|
||||
t.Fatal("public service credential accepted")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user