Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TestFillPluginDefaults broken on 3.x Enterprise #214

Open
rainest opened this issue Sep 13, 2022 · 0 comments
Open

TestFillPluginDefaults broken on 3.x Enterprise #214

rainest opened this issue Sep 13, 2022 · 0 comments

Comments

@rainest
Copy link
Contributor

rainest commented Sep 13, 2022

3.x adds a new websockets option for protocols, but only on Enterprise. This defaults test fails because the Enterprise and OSS defaults are different:

 === RUN   TestFillPluginDefaults/no_config_no_protocols
    plugin_service_test.go:568:   &kong.Plugin{
          	... // 8 identical fields
          	RunOn:    &"test",
          	Ordering: nil,
          	Protocols: []*string{
          		... // 2 identical elements
          		&"http",
          		&"https",
        - 		&"ws",
        - 		&"wss",
          	},
          	Tags: nil,
          }
=== RUN   TestFillPluginDefaults/partial_config_no_protocols
    plugin_service_test.go:568:   &kong.Plugin{
          	... // 8 identical fields
          	RunOn:    nil,
          	Ordering: nil,
          	Protocols: []*string{
          		... // 2 identical elements
          		&"http",
          		&"https",
        - 		&"ws",
        - 		&"wss",
          	},
          	Tags: nil,
          }

The 3.x Enterprise defaults will also differ from the 2.x Enterprise defaults.

We need to create a separate 3.x Enterprise test or add version-dependent behavior internal to the test. The various skip functions don't really accommodate the former yet (you can skip Enterprise, but it skips all versions, or only allow a given Enterprise range while also skipping OSS).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant