Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pkg/cmd/secret/create/create_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ func TestCreateSecret_RequiresID(t *testing.T) {
return &mockConfig{baseURL: "http://api.local", gatewayGroup: "gg1"}, nil
},
})
if err == nil || err.Error() != "--id is required" {
if err == nil || err.Error() != "secret provider id is required; use a positional arg or --id" {
t.Fatalf("expected --id required error, got: %v", err)
}
}
9 changes: 5 additions & 4 deletions test/e2e/config_sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ func trimDumpForRoundtrip(t *testing.T, file string, serviceID, routeID string)
"credentials",
"consumer_groups",
"plugin_configs",
"ssl",
"ssls",
"global_rules",
"stream_routes",
Expand Down Expand Up @@ -225,15 +226,15 @@ func TestConfigSync_FullRoundtrip(t *testing.T) {
require.NoError(t, err)
assert.Contains(t, string(data), routeID)

stdout, stderr, err := runA7WithEnv(env, "config", "diff", "-f", dumpFile, "-g", gatewayGroup)
require.NoError(t, err, "stdout=%s stderr=%s", stdout, stderr)

// CI runs against a shared EE environment. Keep the roundtrip focused on
// the service and route this test created so unrelated resources do not
// introduce sync failures.
trimDumpForRoundtrip(t, dumpFile, svcID, routeID)

stdout, stderr, err = runA7WithEnv(env, "config", "sync", "-f", dumpFile, "-g", gatewayGroup)
stdout, stderr, err := runA7WithEnv(env, "config", "diff", "-f", dumpFile, "-g", gatewayGroup)
require.NoError(t, err, "stdout=%s stderr=%s", stdout, stderr)

stdout, stderr, err = runA7WithEnv(env, "config", "sync", "-f", dumpFile, "--delete=false", "-g", gatewayGroup)
Comment on lines 232 to +237
Copy link

Copilot AI Apr 28, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

config diff exits with an error when differences are found (see pkg/cmd/config/diff/diff.go), so running it after trimDumpForRoundtrip will almost always fail because the trimmed file intentionally omits other remote resources (which show up as deletes). Consider moving the diff call back to before trimming (diffing the unmodified dump against remote), or explicitly tolerating the expected "differences found" error when diffing the trimmed file.

Copilot uses AI. Check for mistakes.
if err != nil && isKnownRoundtripSyncGap(stdout, stderr) {
t.Skipf("shared environment cannot roundtrip sync the dumped config reliably: stdout=%s stderr=%s", stdout, stderr)
}
Expand Down
Loading