Commit graph

78 commits

Author SHA1 Message Date
Jonathan Yu
6c9628cdb1
Build and install from GOPATH
* Rename 'vendor/src' -> 'vendor'
  * Ignore vendor/ instead of vendor/src/ for lint
* Rename 'cmd/client' -> 'cmd/ocic' to make it 'go install'able
* Rename 'cmd/server' -> 'cmd/ocid' to make it 'go install'able
* Update Makefile to build and install from GOPATH
* Update tests to locate ocid/ocic in GOPATH/bin
* Search for binaries in GOPATH/bin instead of PATH
* Install tools using `go get -u`, so they are updated on each run

Signed-off-by: Jonathan Yu <jawnsy@redhat.com>
2017-01-17 12:09:09 -08:00
Samuel Ortiz
8e1af3668a
test: Fix networking helpers indentation
Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-12-21 12:26:18 +01:00
Samuel Ortiz
b6455253c2
test: Add host pod ping test
We create a pod with host networking and we try to ping
it from the host.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-12-21 12:24:37 +01:00
Samuel Ortiz
5273bef5d2
test: Add a inter pod ping networking test
We create 2 pods in 2 different networking namespace and
we check if we can ping one from the other.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-12-21 11:28:33 +01:00
Samuel Ortiz
b97a57c006
test: Skip networking tests if CNI plugins are missing
If the CNI binaries (bridge and host-local) are not installed,
we skip the tests.

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-12-20 12:50:23 +01:00
Samuel Ortiz
4c702fb60c
test: Add 2 basic networking tests
We create temporary CNI networking configurations and run 2
functional tests:

- Verify that the networking namespace interface has a valid CIDR
- Ping the networking namespace interface from the host

Signed-off-by: Samuel Ortiz <sameo@linux.intel.com>
2016-12-20 12:50:20 +01:00
Antonio Murdaca
4bb0830c37 Merge pull request #239 from xlgao-zju/reload-apparmor-profile
reload default apparmor profile if it is unloaded
2016-12-13 11:10:26 +01:00
Antonio Murdaca
f22dc5244f
test: add restart ocid with pod stopped test
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-09 11:56:25 +01:00
Xianglin Gao
cb5ed1ce9d reload default apparmor profile if it is unloaded
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2016-12-07 20:19:29 +08:00
Antonio Murdaca
15f23bc6ac
test: fix apparmor detection
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-12-06 12:10:32 +01:00
Xianglin Gao
4f323377ee add apparmor build tag and update readme
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2016-12-06 11:51:15 +08:00
Xianglin Gao
bec3c3e2aa add test cases
Signed-off-by: Xianglin Gao <xlgao@zju.edu.cn>
2016-12-01 21:42:13 +08:00
Antonio Murdaca
78ee03a8fc
add seccomp support
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-11-28 22:05:34 +01:00
Dan Walsh
488216f57b Make sure selinuxenabled exists before executing it
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-10-17 08:48:14 -04:00
Dan Walsh
04807d586a Setup proper labeling for running test with selinux
The rootfs that gets created needs to have an SELinux label that containers
can write to.  Until they get native storage support, this patch will
force the entire storage pool to be labeled in such a way that confined
containers can read/write/execute the content.

Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-10-14 17:29:20 -04:00
Aleksa Sarai
9fb23bf0dc
ocid: add config subcommand
This subcommand is so that users can get a nice commented version of the
ocid configuration file. This comes from the "current" version of the
configuration (allowing somone to get their custom configuration as a
file). It also has a --default option.

In addition, update the tests to use `ocid config` so that we test this
setup (the loading and saving of the options).

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-10-11 21:21:58 +11:00
Aleksa Sarai
3f48986ea0
cmd: switch to --connect and --listen flags
Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-10-11 03:09:59 +11:00
Antonio Murdaca
9b72f29b72
fixups for tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-08 14:57:45 +02:00
Antonio Murdaca
e0364ec633
add containers restore test
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-10-08 14:46:39 +02:00
Aleksa Sarai
bac579a9e5
server: create pause rootfs manually without Docker
This lessens the Docker requirement for creating sandboxes (with the
requirement only existing for the actual image pulling that is done when
adding a container to a pod). The interface was chosen to match the
--conmon interface, so that the location of the pause binary can be
chosen by a user.

Signed-off-by: Aleksa Sarai <asarai@suse.de>
2016-10-02 20:11:07 +11:00
Dan Walsh
f51c98b057 Install conmon in /usr/libexec/ocid/conmon
Signed-off-by: Dan Walsh <dwalsh@redhat.com>
2016-09-29 08:55:12 -04:00
Mrunal Patel
189b642908 Remove unnecessary sleep from tests
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-09-28 12:16:10 -07:00
Antonio Murdaca
77c40487de
test: suggests sudo make localintegration
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-27 14:23:07 +02:00
Antonio Murdaca
ab8b65b09e
test: cleanup pods at test teardown
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-27 10:46:50 +02:00
Antonio Murdaca
3ddf3f21c1
test: fix and add tests
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-27 10:42:53 +02:00
Mrunal Patel
4606f2a61a Fix the build for ocid to cri-o rename
Signed-off-by: Mrunal Patel <mrunalp@gmail.com>
2016-09-26 16:55:12 -07:00
Antonio Murdaca
aebd365cf4
test: tweak halpers
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-24 00:38:06 +02:00
Antonio Murdaca
5fb0252fd2
add tests skeleton
Signed-off-by: Antonio Murdaca <runcom@redhat.com>
2016-09-24 00:37:07 +02:00