Skip to content
This repository has been archived by the owner on Sep 24, 2021. It is now read-only.

Commit

Permalink
Add critest
Browse files Browse the repository at this point in the history
  • Loading branch information
feiskyer committed May 19, 2017
1 parent 6ecbc61 commit 3e6afef
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ go:

go_import_path: k8s.io/frakti

before_install:
- hack/install-docker.sh

install:
- docker run -v /usr/local/bin:/target jpetazzo/nsenter
- go install -v $(go list ./... | grep -v /vendor/)
Expand Down
27 changes: 27 additions & 0 deletions hack/install-docker.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
#!/bin/bash

# Copyright 2017 The Kubernetes Authors.
#
# 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.

set -o errexit
set -o nounset
set -o pipefail

# Install docker
sudo sh -c 'echo "deb https://apt.dockerproject.org/repo ubuntu-$(lsb_release -cs) main" > /etc/apt/sources.list.d/docker.list'
curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -
sudo apt-key fingerprint 58118E89F3A912897C070ADBF76221572C52609D
sudo apt-get update
sudo apt-get -y install "docker-engine=1.13.1-0~ubuntu-$(lsb_release -cs)"

10 changes: 10 additions & 0 deletions hack/test-e2e.sh
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,14 @@ EOF'
sudo cp bin/* /opt/cni/bin/
}

function test_cri() {
# install critest
go get github.com/kubernetes-incubator/cri-tools/cmd/critest

# run critest
sudo env PATH=$PATH:$GOPATH/bin GOPATH=$GOPATH critest -r=/var/run/frakti.sock --focus="image" validation
}

FRAKTI_LISTEN_ADDR=${FRAKTI_LISTEN_ADDR:-/var/run/frakti.sock}
HYPERD_PORT=${HYPERD_PORT:-22318}
HYPERD_HOME=${HYPERD_HOME:-/var/lib/hyper}
Expand All @@ -147,6 +155,8 @@ runTests() {
start_frakti

frakti::test::e2e

test_cri
}

runTests
Expand Down

0 comments on commit 3e6afef

Please sign in to comment.