Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
beiran
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
79
Issues
79
List
Boards
Labels
Milestones
Merge Requests
13
Merge Requests
13
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
beiran
beiran
Commits
ea075f45
Commit
ea075f45
authored
Oct 21, 2019
by
Hilal Ozdemir
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test/bats: remove python commands and use beiran installed with setuptools
parent
cf735609
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
26 additions
and
26 deletions
+26
-26
beiran-cli-beiran2.bats
test/bats/beiran-cli-beiran2.bats
+3
-3
beiran-cli-beiran3.bats
test/bats/beiran-cli-beiran3.bats
+2
-2
beiran-cli-beiran4.bats
test/bats/beiran-cli-beiran4.bats
+2
-2
beiran-cli-beiran5.bats
test/bats/beiran-cli-beiran5.bats
+8
-8
beiran-cli-beiran6.bats
test/bats/beiran-cli-beiran6.bats
+2
-2
beiran-cli-beiran7.bats
test/bats/beiran-cli-beiran7.bats
+9
-9
No files found.
test/bats/beiran-cli-beiran2.bats
View file @
ea075f45
#!/usr/bin/env bats
@test "pulling an image from another node (with '--no-progress' option) exits peacefully" {
run
python -m
beiran docker image pull alpine --no-progress
run beiran docker image pull alpine --no-progress
[ "$status" -eq 0 ]
}
@test "pulling a non-existing image (with '--no-progress' option) exits with error code" {
run
python -m
beiran docker image pull a_non_existent_image --no-progress
run beiran docker image pull a_non_existent_image --no-progress
[ "$status" -eq 1 ]
}
@test "pulling an image with docker image manifest v2 schema 1 from origin exists peacefully" {
run
python -m
beiran docker image pull alpine:2.7
run beiran docker image pull alpine:2.7
[ "$status" -eq 0 ]
}
\ No newline at end of file
test/bats/beiran-cli-beiran3.bats
View file @
ea075f45
#!/usr/bin/env bats
@test "pulling an image from another node (with '--wait' and '--no-progress' options) exits peacefully" {
run
python -m
beiran docker image pull alpine --wait --no-progress
run beiran docker image pull alpine --wait --no-progress
[ "$status" -eq 0 ]
}
@test "pulling a non-existing image (with '--wait' and '--no-progress' options) exits with error code" {
run
python -m
beiran docker image pull a_non_existent_image --wait --no-progress
run beiran docker image pull a_non_existent_image --wait --no-progress
[ "$status" -eq 1 ]
}
test/bats/beiran-cli-beiran4.bats
View file @
ea075f45
#!/usr/bin/env bats
@test "pulling an image from another node exits peacefully" {
run
python -m
beiran docker image pull alpine
run beiran docker image pull alpine
[ "$status" -eq 0 ]
}
@test "pulling a non-existing image exits with error code" {
run
python -m
beiran docker image pull a_non_existent_image
run beiran docker image pull a_non_existent_image
[ "$status" -eq 1 ]
}
test/bats/beiran-cli-beiran5.bats
View file @
ea075f45
#!/usr/bin/env bats
@test "pulling an image from a specific node (with '--from' option) exits peacefully" {
current_node_uuid="$(
python -m beiran.cli
node info | tail -1 | awk '{print $2}' | cut -d "#" -f 2)"
another_node_uuid="$(
python -m beiran.cli
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '1q;d')"
current_node_uuid="$(
beiran
node info | tail -1 | awk '{print $2}' | cut -d "#" -f 2)"
another_node_uuid="$(
beiran
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '1q;d')"
if [ "$current_node_uuid" -eq "$another_node_uuid" ]
then
another_node_uuid="$(
python -m beiran.cli
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '2q;d')"
another_node_uuid="$(
beiran
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '2q;d')"
fi
run
python -m
beiran docker image pull alpine --from $another_node_uuid
run beiran docker image pull alpine --from $another_node_uuid
[ "$status" -eq 0 ]
}
@test "pulling a non-existing image from a specific node (with '--from' option) exits with error code" {
current_node_uuid="$(
python -m beiran.cli
node info | tail -1 | awk '{print $2}' | cut -d "#" -f 2)"
another_node_uuid="$(
python -m beiran.cli
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '1q;d')"
current_node_uuid="$(
beiran
node info | tail -1 | awk '{print $2}' | cut -d "#" -f 2)"
another_node_uuid="$(
beiran
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '1q;d')"
if [ "$current_node_uuid" -eq "$another_node_uuid" ]
then
another_node_uuid="$(
python -m beiran.cli
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '2q;d')"
another_node_uuid="$(
beiran
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '2q;d')"
fi
run
python -m
beiran docker image pull a_non_existent_image --from $another_node_uuid
run beiran docker image pull a_non_existent_image --from $another_node_uuid
[ "$status" -eq 1 ]
}
\ No newline at end of file
test/bats/beiran-cli-beiran6.bats
View file @
ea075f45
#!/usr/bin/env bats
@test "pulling an image from another node (with '--whole-image-only' option) exits peacefully" {
run
python -m
beiran docker image pull alpine --whole-image-only
run beiran docker image pull alpine --whole-image-only
[ "$status" -eq 0 ]
}
@test "pulling a non-existing image (with '--whole-image-only' option) exits with error code" {
run
python -m
beiran docker image pull a_non_existent_image --whole-image-only
run beiran docker image pull a_non_existent_image --whole-image-only
[ "$status" -eq 1 ]
}
test/bats/beiran-cli-beiran7.bats
View file @
ea075f45
@test "pulling an image from a specific node (with '--whole-image-only' and '--from' options) exits peacefully" {
current_node_uuid="$(
python -m beiran.cli
node info | tail -1 | awk '{print $2}' | cut -d "#" -f 2)"
another_node_uuid="$(
python -m beiran.cli
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '1q;d')"
current_node_uuid="$(
beiran
node info | tail -1 | awk '{print $2}' | cut -d "#" -f 2)"
another_node_uuid="$(
beiran
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '1q;d')"
if [ "$current_node_uuid" == "$another_node_uuid" ]
then
another_node_uuid="$(
python -m beiran.cli
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '2q;d')"
another_node_uuid="$(
beiran
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '2q;d')"
fi
run
python -m
beiran docker image pull alpine --whole-image-only --from $another_node_uuid
run beiran docker image pull alpine --whole-image-only --from $another_node_uuid
[ "$status" -eq 0 ]
}
@test "pulling a non-existing image from a specific node (with '--whole-image-only' and '--from' options) exits with error code" {
current_node_uuid="$(
python -m beiran.cli
node info | tail -1 | awk '{print $2}' | cut -d "#" -f 2)"
another_node_uuid="$(
python -m beiran.cli
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '1q;d')"
current_node_uuid="$(
beiran
node info | tail -1 | awk '{print $2}' | cut -d "#" -f 2)"
another_node_uuid="$(
beiran
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '1q;d')"
if [ "$current_node_uuid" == "$another_node_uuid" ]
then
another_node_uuid="$(
python -m beiran.cli
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '2q;d')"
another_node_uuid="$(
beiran
node list | cut -d ' ' -f1 | grep -x '[_[:alnum:]]\{32\}' | sed '2q;d')"
fi
run
python -m
beiran docker image pull a_non_existent_image --whole-image-only --from $another_node_uuid
run beiran docker image pull a_non_existent_image --whole-image-only --from $another_node_uuid
[ "$status" -eq 1 ]
}
@test "pulling an image with docker image manifest v2 schema 1 from another node exists peacefully" {
run
python -m
beiran docker image pull alpine:2.7
run beiran docker image pull alpine:2.7
[ "$status" -eq 0 ]
}
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment