Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
old/
TODO.txt
playground.txt
attic/
.vscode/
Expand All @@ -23,6 +22,7 @@ _*
conf/gcp
conf/aws
kubeconfig
*.kubeconfig
env-github
.env*
runtimes.json
Expand Down
3 changes: 2 additions & 1 deletion Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ includes:
aws: ./TaskfileAWS.yml
gcp: ./TaskfileGCloud.yml
azure: ./TaskfileAzure.yml

test: ./TaskfileTest.yml

tasks:
default: task --list-all
setup: { silent: true }
Expand Down
30 changes: 30 additions & 0 deletions TaskfileTest.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
version: '3'

tasks:

enter: >
docker run -ti --net=host
-v $PWD/olaris:/root/olaris
-v $PWD/test-olaris:/root/test-olaris
--mount source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind
test-olaris bash

build: docker build test-olaris -t test-olaris --load

run: >
docker run -ti --net=host
-v $PWD/olaris:/root/olaris
-v $PWD/test-olaris:/root/test-olaris
--mount source=/var/run/docker.sock,target=/var/run/docker.sock,type=bind
test-olaris bats test-olaris

export:
- nuv util kube export FILE=test-olaris/aks.kubeconfig NAME=aks-nuvolaris-testing
- nuv util kube export FILE=test-olaris/eks.kubeconfig NAME=eks-nuvolaris-testing

all:
- task: build
- task: export
- task: run


2 changes: 1 addition & 1 deletion olaris
21 changes: 21 additions & 0 deletions test-olaris/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
FROM ubuntu:22.04
RUN apt-get update && apt-get install -y git jq wget curl
WORKDIR /tmp
RUN git clone https://github.com/bats-core/bats-core.git ;\
cd bats-core ; ./install.sh /usr/local
RUN curl -fsSL https://get.docker.com | bash
WORKDIR /root
RUN mkdir test_helper ;\
cd test_helper ;\
git clone https://github.com/bats-core/bats-support ;\
git clone https://github.com/bats-core/bats-file ;\
git clone https://github.com/bats-core/bats-assert ;\
git clone https://github.com/bats-core/bats-detik
ENV NUV_BRANCH=3.0.0-testing
RUN VER="$(curl https://raw.githubusercontent.com/nuvolaris/olaris/3.0.0-testing/nuvroot.json | jq .version -r)" ;\
ARCH="$(dpkg --print-architecture)";\
URL="https://github.com/nuvolaris/nuv/releases/download/$VER/nuv_${VER}_${ARCH}.deb" ;\
wget --no-verbose $URL -O nuv.deb ;\
dpkg -i nuv.deb ;\
nuv -update ;\
nuv -info
10 changes: 10 additions & 0 deletions test-olaris/TODO.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# TODO (and test)

- when you switch the configuration, read back, apihost, email/tls, enabled services

- test you can switch configurations and be able to use admin

- test the secrets are propagated back to the users

- test secrets are propagated to users

File renamed without changes.
File renamed without changes.
13 changes: 13 additions & 0 deletions test-olaris/info.bats
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
setup() {
load '../test_helper/bats-support/load'
load '../test_helper/bats-assert/load'
nuv util kube import FILE=test-olaris/aks.kubeconfig NAME=aks
nuv util kube import FILE=test-olaris/eks.kubeconfig NAME=eks
export NO_COLOR=1
}

@test "info" {
run nuv -info
assert_line "NUV_ROOT: /root/olaris"
assert_success
}