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

OTA-1403: Create minimal openshift tests extension #1168

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The movement of the files could be considered an overkill. I am interested in opinions and suggestions.

Copy link
Member

Choose a reason for hiding this comment

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

I'm a fan actually - but would do it in a separate PR that does nothing else

File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
31 changes: 31 additions & 0 deletions cmd/openshift-tests-extension/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
package main

import (
"os"

"github.com/spf13/cobra"

"github.com/openshift-eng/openshift-tests-extension/pkg/cmd"
"github.com/openshift-eng/openshift-tests-extension/pkg/extension"
"github.com/openshift-eng/openshift-tests-extension/pkg/extension/extensiontests"
)

func main() {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

registry := extension.NewRegistry()
ext := extension.NewExtension("openshift", "payload", "cluster-version-operator")

var specs []*extensiontests.ExtensionTestSpec
ext.AddSpecs(specs)
registry.Register(ext)

root := &cobra.Command{
Long: "OpenShift Tests Extension for Cluster Version Operator",
}
root.AddCommand(cmd.DefaultExtensionCommands(registry)...)

if err := func() error {
return root.Execute()
}(); err != nil {
os.Exit(1)
}
}
2 changes: 1 addition & 1 deletion hack/build-go.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ fi
mkdir -p ${BIN_PATH}

echo "Building ${REPO} (${VERSION_OVERRIDE})"
GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -ldflags "${GLDFLAGS}" -o ${BIN_PATH}/cluster-version-operator ${REPO}/cmd/...
GOOS=${GOOS} GOARCH=${GOARCH} go build ${GOFLAGS} -ldflags "${GLDFLAGS}" -o ${BIN_PATH}/cluster-version-operator ${REPO}/cmd/cluster-version-operator/...