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

Opm test #196

Merged
merged 1 commit into from
Mar 13, 2020
Merged

Opm test #196

merged 1 commit into from
Mar 13, 2020

Conversation

gallettilance
Copy link
Member

Description of the change:

Motivation for the change:

Reviewer Checklist

  • Implementation matches the proposed design, or proposal is updated to match implementation
  • Sufficient unit test coverage
  • Sufficient end-to-end test coverage
  • Docs updated or added to /docs
  • Commit messages sensible and descriptive

Sorry, something went wrong.

@openshift-ci-robot openshift-ci-robot added the size/M Denotes a PR that changes 30-99 lines, ignoring generated files. label Feb 25, 2020
@gallettilance gallettilance force-pushed the opm-test branch 4 times, most recently from ecf008a to 5eb0e01 Compare February 26, 2020 15:01
opm-test.sh Outdated
echo "pushing index image"
$containerTool push $indexImage

echo "sleep for 30s before pulling image"
Copy link
Member

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?

Copy link
Member Author

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

Copy link
Member

@awgreene awgreene Feb 26, 2020

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
Copy link
Member

@ecordell ecordell Feb 26, 2020

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 execs opm (or just exercises the commands directly)?

Copy link
Member

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

Copy link
Member Author

Choose a reason for hiding this comment

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

sure!

Copy link
Member

@awgreene awgreene left a 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"
Copy link
Member

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)
Copy link
Member

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
Copy link
Member

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"
Copy link
Member

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"
Copy link
Member

@awgreene awgreene Feb 26, 2020

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"
Copy link
Member

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.

@gallettilance gallettilance force-pushed the opm-test branch 4 times, most recently from e64e717 to 6d71aee Compare February 27, 2020 20:39
@openshift-ci-robot openshift-ci-robot added size/L Denotes a PR that changes 100-499 lines, ignoring generated files. and removed size/M Denotes a PR that changes 30-99 lines, ignoring generated files. labels Feb 27, 2020
opm-test.go Outdated
return loader.Populate()
}

func main() {
Copy link
Member

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?)

Copy link
Member

@kevinrizza kevinrizza left a 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
Copy link
Member

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.

Copy link
Member Author

Choose a reason for hiding this comment

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

for sure

@openshift-ci-robot openshift-ci-robot added needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files. and removed size/L Denotes a PR that changes 100-499 lines, ignoring generated files. labels Mar 12, 2020
@benluddy benluddy force-pushed the opm-test branch 5 times, most recently from 35987a9 to edde384 Compare March 12, 2020 03:42
@benluddy
Copy link
Contributor

/hold

@openshift-ci-robot openshift-ci-robot added the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 12, 2020
@openshift-ci-robot openshift-ci-robot removed the needs-rebase Indicates a PR cannot be merged because it has merge conflicts with HEAD. label Mar 12, 2020
@benluddy benluddy force-pushed the opm-test branch 6 times, most recently from ddf1586 to 727f39a Compare March 12, 2020 17:39
@benluddy
Copy link
Contributor

@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

@benluddy
Copy link
Contributor

/hold cancel

@openshift-ci-robot openshift-ci-robot removed the do-not-merge/hold Indicates that a PR should not merge because someone has issued a /hold command. label Mar 12, 2020
@benluddy
Copy link
Contributor

/test e2e-aws

3 similar comments
@benluddy
Copy link
Contributor

/test e2e-aws

@benluddy
Copy link
Contributor

/test e2e-aws

@benluddy
Copy link
Contributor

/test e2e-aws

@benluddy benluddy mentioned this pull request Mar 13, 2020
@@ -5,9 +5,9 @@ import (
"database/sql"
"fmt"

"github.com/sirupsen/logrus"

"github.com/operator-framework/operator-registry/pkg/sqlite"
Copy link
Member

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

Verified

This commit was signed with the committer’s verified signature.
benluddy Ben Luddy
Copy link
Member

@ecordell ecordell left a comment

Choose a reason for hiding this comment

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

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Mar 13, 2020
@openshift-ci-robot
Copy link

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Mar 13, 2020
@openshift-merge-robot openshift-merge-robot merged commit 100f3bc into master Mar 13, 2020
@benluddy benluddy deleted the opm-test branch March 14, 2020 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. size/XXL Denotes a PR that changes 1000+ lines, ignoring generated files.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants