Skip to content

Commit

Permalink
Add v1.0.2 runtime apis
Browse files Browse the repository at this point in the history
  • Loading branch information
mpanchajanya committed Oct 13, 2023
1 parent 2d49faf commit f535e7f
Show file tree
Hide file tree
Showing 53 changed files with 9,789 additions and 3,708 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -139,6 +139,7 @@ build-compatibility-test-plugins: ## Builds all runtime compatibility test plugi
cd ./test/compatibility/testplugins/runtime-test-plugin-v0_25_4 && ${GO} mod tidy && GOOS=$(OS) GOARCH=$(ARCH) ${GO} build -o ../bin
cd ./test/compatibility/testplugins/runtime-test-plugin-v0_28_0 && ${GO} mod tidy && GOOS=$(OS) GOARCH=$(ARCH) ${GO} build -o ../bin
cd ./test/compatibility/testplugins/runtime-test-plugin-v0_90 && ${GO} mod tidy && GOOS=$(OS) GOARCH=$(ARCH) ${GO} build -o ../bin
cd ./test/compatibility/testplugins/runtime-test-plugin-v1_0_2 && ${GO} mod tidy && GOOS=$(OS) GOARCH=$(ARCH) ${GO} build -o ../bin
cd ./test/compatibility/testplugins/runtime-test-plugin-latest && ${GO} mod tidy && GOOS=$(OS) GOARCH=$(ARCH) ${GO} build -o ../bin

# The below command runs the compatibility tests using ginkgo and filter the logs as per regex and exit code with '0' representing success and non-zero values indicating test failures
Expand Down
2 changes: 2 additions & 0 deletions test/compatibility/core/api_constants.go
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ const (
Version0254 RuntimeVersion = "v0.25.4"
Version0280 RuntimeVersion = "v0.28.0"
Version090 RuntimeVersion = "v0.90.0"
Version102 RuntimeVersion = "v1.0.2"
VersionLatest RuntimeVersion = "latest"
)

Expand All @@ -106,6 +107,7 @@ var SupportedRuntimeVersions = []RuntimeVersion{
Version0254,
Version0280,
Version090,
Version102,
VersionLatest,
}

Expand Down
3 changes: 3 additions & 0 deletions test/compatibility/core/helpers.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const (
pluginV0254 = "runtime-test-plugin-v0_25_4"
pluginV0280 = "runtime-test-plugin-v0_28_0"
pluginV090 = "runtime-test-plugin-v0_90"
pluginV102 = "runtime-test-plugin-v1_0_2"
pluginLatest = "runtime-test-plugin-latest"
)

Expand Down Expand Up @@ -55,6 +56,8 @@ func makeRuntimeTestPluginCommand(version RuntimeVersion) string {
return fmt.Sprintf("%v/%v test", pluginRoot, pluginV0280)
case Version090:
return fmt.Sprintf("%v/%v test", pluginRoot, pluginV090)
case Version102:
return fmt.Sprintf("%v/%v test", pluginRoot, pluginV102)
case VersionLatest:
return fmt.Sprintf("%v/%v test", pluginRoot, pluginLatest)
default:
Expand Down
13 changes: 13 additions & 0 deletions test/compatibility/core/helpers_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,19 @@ func TestConstructTestPluginCmd(t *testing.T) {
pluginCmd: pluginLatest,
err: "",
},
{
version: Version102,
apis: []*API{
{
Name: SetContextAPI,
Version: Version102,
Arguments: map[APIArgumentType]interface{}{},
Output: nil,
},
},
pluginCmd: pluginV102,
err: "",
},
{
version: Version090,
apis: []*API{
Expand Down
6 changes: 3 additions & 3 deletions test/compatibility/core/validators_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ func TestValidRuntimeVersionV090(t *testing.T) {
}

func TestInvalidRuntimeVersion(t *testing.T) {
version101 := &RuntimeAPIVersion{RuntimeVersion: "v1.0.1"}
actual, err := version101.Validate()
assert.Equal(t, "runtime version v1.0.1 is not supported", err.Error())
Version103 := &RuntimeAPIVersion{RuntimeVersion: "v1.0.3"}
actual, err := Version103.Validate()
assert.Equal(t, "runtime version v1.0.3 is not supported", err.Error())
assert.Equal(t, false, actual)
}
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ func DefaultCLIDiscoverySourcePerVersion(version core.RuntimeVersion) *CfgCLIDis
WithOCIDiscoveryOpts(oci),
WithContextType(types.CtxTypeTMC),
)
case core.VersionLatest, core.Version090, core.Version0280:
case core.VersionLatest, core.Version102, core.Version090, core.Version0280:
return NewCfgCLIDiscoverySourcesArgs(
WithOCIDiscoveryOpts(oci),
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ func (opts *SetCLIDiscoverySourceInputOptions) Validate() (bool, error) {
}

switch opts.RuntimeVersion {
case core.VersionLatest, core.Version090, core.Version0280, core.Version0116:
case core.VersionLatest, core.Version102, core.Version090, core.Version0280, core.Version0116:
err = opts.PluginDiscoveryOpts.ValidPluginDiscovery()
if err != nil {
return false, err
Expand Down Expand Up @@ -65,7 +65,7 @@ func (opts *GetCLIDiscoverySourceOutputOptions) Validate() (bool, error) {
}

switch opts.RuntimeVersion {
case core.VersionLatest, core.Version090, core.Version0280, core.Version0116:
case core.VersionLatest, core.Version102, core.Version090, core.Version0280, core.Version0116:
err = opts.PluginDiscoveryOpts.ValidPluginDiscovery()
if err != nil {
return false, err
Expand Down

Large diffs are not rendered by default.

1,356 changes: 1,071 additions & 285 deletions test/compatibility/framework/compatibilitytests/context/context_test.go

Large diffs are not rendered by default.

This file was deleted.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

506 changes: 176 additions & 330 deletions test/compatibility/framework/compatibilitytests/metadata/metadata_test.go

Large diffs are not rendered by default.

2,890 changes: 2,502 additions & 388 deletions test/compatibility/framework/compatibilitytests/server/server_test.go

Large diffs are not rendered by default.

This file was deleted.

Loading

0 comments on commit f535e7f

Please sign in to comment.