Skip to content

Commit

Permalink
Issue #67 Add support for Minishift integration tests
Browse files Browse the repository at this point in the history
  • Loading branch information
agajdosi authored and LalatenduMohanty committed Mar 22, 2018
1 parent b72d0f3 commit 535cd18
Show file tree
Hide file tree
Showing 12 changed files with 586 additions and 0 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -0,0 +1,2 @@
vendor
testing
3 changes: 3 additions & 0 deletions CONTRIBUTING.adoc
Expand Up @@ -21,6 +21,9 @@ Thank you for your contributions! Please follow this process to submit a patch:
NOTE: If you submit a new add-on, the add-on must be added as a sub-directory in the *_/add-ons/_* sub-directory of the repository.
See the documentation for information about link:https://docs.openshift.org/latest/minishift/using/addons.html#add-ons-overview[file structure and content format].

NOTE: We also recommend providing integration tests for the add-on.
See the link:TESTING.adoc[integration tests documentation] for more information.

[[questions]]
== Questions?

Expand Down
239 changes: 239 additions & 0 deletions Gopkg.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

38 changes: 38 additions & 0 deletions Gopkg.toml
@@ -0,0 +1,38 @@
# Gopkg.toml example
#
# Refer to https://github.com/golang/dep/blob/master/docs/Gopkg.toml.md
# for detailed Gopkg.toml documentation.
#
# required = ["github.com/user/thing/cmd/thing"]
# ignored = ["github.com/user/project/pkgX", "bitbucket.org/user/project/pkgA/pkgY"]
#
# [[constraint]]
# name = "github.com/user/project"
# version = "1.0.0"
#
# [[constraint]]
# name = "github.com/user/project2"
# branch = "dev"
# source = "github.com/myfork/project2"
#
# [[override]]
# name = "github.com/x/y"
# version = "2.4.0"
#
# [prune]
# non-go = false
# go-tests = true
# unused-packages = true


[[constraint]]
name = "github.com/DATA-DOG/godog"
version = "=0.7.4"

[[constraint]]
name = "github.com/minishift/minishift"
branch = "master"

[prune]
go-tests = true
unused-packages = true
39 changes: 39 additions & 0 deletions Makefile
@@ -0,0 +1,39 @@
# Copyright (C) 2018 Red Hat, Inc.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# Setting up paths
REPOPATH ?= github.com/minishift/minishift-addons
TEST_DIR ?= $(CURDIR)/testing
INTEGRATION_TEST_DIR = $(TEST_DIR)/integration-test

# Platfrom dependency
ifeq ($(GOOS),windows)
IS_EXE := .exe
endif

# Integration tests
TIMEOUT ?= 3600s
MINISHIFT_BINARY ?= $(TEST_DIR)/bin/minishift$(IS_EXE)

# Make target definitions
.PHONY: integration
integration: ADDON ?= ""
integration:
mkdir -p $(INTEGRATION_TEST_DIR)
go test -timeout $(TIMEOUT) $(REPOPATH)/test/integration --tags=integration -v -args --test-dir $(INTEGRATION_TEST_DIR) --binary $(MINISHIFT_BINARY) \
--run-before-feature="$(RUN_BEFORE_FEATURE)" --test-with-specified-shell="$(TEST_WITH_SPECIFIED_SHELL)" --tags=$(ADDON) $(GODOG_OPTS)

.PHONY: vendor
vendor:
dep ensure -v

0 comments on commit 535cd18

Please sign in to comment.