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 go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ require (
github.com/fatih/color v1.18.0
github.com/google/go-cmp v0.7.0
github.com/kong/go-apiops v0.4.0
github.com/kong/go-database-reconciler v1.35.0
github.com/kong/go-database-reconciler v1.35.1
github.com/kong/go-kong v0.74.0
Comment thread
Prashansa-K marked this conversation as resolved.
github.com/mitchellh/go-homedir v1.1.0
github.com/spf13/cobra v1.10.2
Expand Down
6 changes: 2 additions & 4 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -207,10 +207,8 @@ github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kong/go-apiops v0.4.0 h1:rXxdcE6VkDTOkhGt/ZytYqp8elw3SfrBQ/+r42lX2J4=
github.com/kong/go-apiops v0.4.0/go.mod h1:Xt99d90LallLVwYJAGaufiNbBdsK0KKboe7gR4Ryths=
github.com/kong/go-database-reconciler v1.33.0 h1:EAwap2hSCwHUJfVxbF+uw6UruqC47hNMGRbXhinY9IE=
github.com/kong/go-database-reconciler v1.33.0/go.mod h1:CTFu9hfOh2L4qPniCUCqLYhKiuVA0UsQe0Iv4jZc58o=
github.com/kong/go-database-reconciler v1.35.0 h1:36Lmik7eoNMl+B/g6beWqBVgGl8b2vLXwNYNUVOtdRM=
github.com/kong/go-database-reconciler v1.35.0/go.mod h1:AeQNEbEQ/Wy3OwJiWIo3PwWCWfav25F/FsTESqbelac=
github.com/kong/go-database-reconciler v1.35.1 h1:u8e7bL/T14UD+tI2ynjLhboOjtvEOk98L2iz79gTP6w=
github.com/kong/go-database-reconciler v1.35.1/go.mod h1:AeQNEbEQ/Wy3OwJiWIo3PwWCWfav25F/FsTESqbelac=
github.com/kong/go-kong v0.74.0 h1:iNs3tHeCRWL2lbJ4io0Rpm23u4GZchFY2wJ/BUxNs4w=
github.com/kong/go-kong v0.74.0/go.mod h1:Wx5aTcMjyUnIF94M5NYFWb/EnuEkqB5STrWvybFSYYQ=
github.com/kong/go-slugify v1.0.0 h1:vCFAyf2sdoSlBtLcrmDWUFn0ohlpKiKvQfXZkO5vSKY=
Expand Down
27 changes: 27 additions & 0 deletions tests/integration/sync_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -11635,6 +11635,33 @@ func Test_Sync_KonnectWorkspace(t *testing.T) {
}
}

func Test_Sync_ConsumerGroupNotFoundForConsumer(t *testing.T) {
tests := []struct {
name string
kongFile string
expectedError string
}{
{
name: "consumer references non-existent consumer group",
kongFile: "testdata/sync/051-consumer-group-not-found/kong.yaml",
expectedError: "building state: consumer-group 'non-existent-group' not " +
"found for consumer '58076db2-28b6-423b-ba39-a797193017f7'",
},
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {
runWhenEnterpriseOrKonnect(t, ">=3.0.0")
setup(t)

ctx := context.Background()

err := sync(ctx, tc.kongFile)
require.Error(t, err)
assert.EqualError(t, err, tc.expectedError)
})
}
}

// test scope:
// - >=2.8.0 <3.0.0 kong+enterprise
// - >=3.0.0 kong+enterprise
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
_format_version: "3.0"
consumers:
- username: test-consumer
id: "58076db2-28b6-423b-ba39-a797193017f7"
groups:
- name: non-existent-group

Loading