-
Notifications
You must be signed in to change notification settings - Fork 252
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
Opm test #196
Opm test #196
Conversation
ecf008a
to
5eb0e01
Compare
opm-test.sh
Outdated
echo "pushing index image" | ||
$containerTool push $indexImage | ||
|
||
echo "sleep for 30s before pulling image" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why do we need to sleep?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh good catch. I had this for when I was pulling from the same tag locally on every run
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a reason for the 30s wait, please add a comment.
opm-test.sh
Outdated
@@ -1,26 +1,58 @@ | |||
#!/bin/bash |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
could we make this a go file that exec
s opm (or just exercises the commands directly)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
that will also let you use build tags to selectively build for os
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great @gallettilance! A few nits but nothing blocking.
opm-test.sh
Outdated
read -p "docker or podman: " containerTool | ||
username=$2 | ||
token=$3 | ||
echo "logging in to quay" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: into
opm-test.sh
Outdated
docker login -u "$username" -p "$token" quay.io | ||
|
||
echo "Generating Random Tag" | ||
bundleTag1=$(cat /dev/urandom | tr -dc 'a-zA-Z0-9' | fold -w 6 | head -n 1) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could this be a function?
opm-test.sh
Outdated
|
||
echo "building opm" | ||
go build -mod=vendor -o bin/opm ./cmd/opm | ||
echo "building initializer" | ||
go build -mod=vendor -o bin/initializer ./cmd/initializer |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Double space between mod
and o
.
opm-test.sh
Outdated
indexImage="quay.io/olmtest/e2e-index:$indexTag" | ||
|
||
if [ $# -eq 0 ]; then | ||
echo "No container tool argument supplied" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Technically this means no arguments were supplied right?
opm-test.sh
Outdated
echo "pushing index image" | ||
$containerTool push $indexImage | ||
|
||
echo "sleep for 30s before pulling image" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If there is a reason for the 30s wait, please add a comment.
opm-test.sh
Outdated
fi | ||
|
||
containerTool="$1" | ||
echo "Running with container tool $containerTool" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Most of the echos
are lowercase, please make this consistent.
e64e717
to
6d71aee
Compare
opm-test.go
Outdated
return loader.Populate() | ||
} | ||
|
||
func main() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not use the testing package and run through all of the options (that exist for the target os?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mostly nits, but I am interested in why we aren't using go test
for this
.travis.yml
Outdated
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then mingw32-make build; fi | ||
- if [[ "$TRAVIS_OS_NAME" != "windows" ]]; then make unit build; fi | ||
script: | | ||
if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since this seems like technical debt to actually enable these tests in multiple environments, can we just run the tests in only linux to start and create issues to get them enabled everywhere else at a later time? Even if we don't remove these steps for now, I think it would be valuable to track it somewhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for sure
35987a9
to
edde384
Compare
/hold |
ddf1586
to
727f39a
Compare
@kevinrizza @ecordell @awgreene I updated this change to run the new tests as ginkgo specs. They'll be skipped when running against PRs from forks, which won't have access to registry credentials (https://docs.travis-ci.com/user/pull-requests/#pull-requests-and-security-restrictions). PTAL! https://github.com/operator-framework/operator-registry/pull/196/checks |
/hold cancel |
/test e2e-aws |
3 similar comments
/test e2e-aws |
/test e2e-aws |
/test e2e-aws |
pkg/lib/registry/registry.go
Outdated
@@ -5,9 +5,9 @@ import ( | |||
"database/sql" | |||
"fmt" | |||
|
|||
"github.com/sirupsen/logrus" | |||
|
|||
"github.com/operator-framework/operator-registry/pkg/sqlite" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: we have been using default - library - current module
order for imports
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: awgreene, ecordell, gallettilance The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Description of the change:
Motivation for the change:
Reviewer Checklist
/docs