Skip to content
Snippets Groups Projects
Commit ce01ec4d authored by Diego Giovane Pasqualin's avatar Diego Giovane Pasqualin
Browse files

Merge branch 'issue/27' into 'development'


Issue #27: Integra teste de criar usuario e o de retorno

Signed-off-by: default avatarFelipe Shi Iu Wu <felipeshiwu@gmail.com>

See merge request !27
parents 0510e0eb 25b478a9
No related branches found
No related tags found
2 merge requests!51Merge development to master,!27Issue #27: Integra teste de criar usuario e o de retorno
Pipeline #
...@@ -41,11 +41,13 @@ testDebian: ...@@ -41,11 +41,13 @@ testDebian:
- regular - regular
- debian - debian
script: script:
- apt-get update && apt-get install -y git jq - apt-get update && apt-get install -y git jq faketime expect
- git clone https://github.com/sstephenson/bats.git - git clone https://github.com/sstephenson/bats.git
- cd bats - cd bats
- ./install.sh /usr - ./install.sh /usr
- cd ../test - cd ../test
- ./create_users.sh
- last -F
- ./returnTest.bats - ./returnTest.bats
dependencies: dependencies:
- compile - compile
...@@ -56,8 +58,10 @@ testUbuntu: ...@@ -56,8 +58,10 @@ testUbuntu:
- ubuntu - ubuntu
- regular - regular
script: script:
- apt-get update && apt-get install -y bats jq - apt-get update && apt-get install -y bats jq faketime expect
- cd test - cd test
- ./create_users.sh
- last -F
- ./returnTest.bats - ./returnTest.bats
dependencies: dependencies:
- compile - compile
...@@ -68,8 +72,13 @@ testOpensuse: ...@@ -68,8 +72,13 @@ testOpensuse:
- opensuse - opensuse
script: script:
- zypper -n update - zypper -n update
- zypper -n install bats && zypper -n install jq - zypper -n install bats jq libfaketime expect
- touch /var/log/wtmp
- chown root.tty /var/log/wtmp
- chmod 664 /var/log/wtmp
- cd test - cd test
- ./create_users.sh
- last -F
- ./returnTest.bats - ./returnTest.bats
dependencies: dependencies:
- compile - compile
#!/usr/bin/env bats #!/usr/bin/env bats
function amount_users() { function amount_users() {
expected_number_of_users=3
obj=$(cat export.json | jq -r '.data.amount_users') obj=$(cat export.json | jq -r '.data.amount_users')
[[ "$obj" -eq "$obj" ]] && [[ "$obj" != "null" ]] [[ "$obj" -eq "$expected_number_of_users" ]] && [[ "$obj" != "null" ]]
} }
function mac_address() { function mac_address() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment