Browse Source

fix(hello-devops) fix subject and tests name

pull/1654/head
Zouhair AMAZZAL 2 years ago committed by Zouhair AMAZZAL
parent
commit
23d56da262
  1. 4
      sh/tests/hello-devops_test.sh
  2. 0
      sh/tests/solutions/hello-devops.sh
  3. 10
      subjects/devops/hello_devops/README.md

4
sh/tests/hello_devops_test.sh → sh/tests/hello-devops_test.sh

@ -5,14 +5,14 @@ set -euo pipefail
IFS=' IFS='
' '
FILENAME="student/hello_devops.sh" FILENAME="student/hello-devops.sh"
# True if FILE exists and is a regular file # True if FILE exists and is a regular file
if [ -f ${FILENAME} ]; then if [ -f ${FILENAME} ]; then
# FILE exists and it's not empty # FILE exists and it's not empty
if [ -s ${FILENAME} ]; then if [ -s ${FILENAME} ]; then
submitted=$(bash $FILENAME) submitted=$(bash $FILENAME)
expected=$(bash solutions/hello_devops.sh) expected=$(bash solutions/hello-devops.sh)
diff <(echo "$submitted") <(echo "$expected") | cat -t diff <(echo "$submitted") <(echo "$expected") | cat -t
else else
echo "The file exist but is empty" echo "The file exist but is empty"

0
sh/tests/solutions/hello_devops.sh → sh/tests/solutions/hello-devops.sh

10
subjects/devops/hello_devops/README.md

@ -28,7 +28,7 @@ This command needs to be adapted with **your own username**.
#### 2- set #### 2- set
Once the repository is created, use you code editor to write your first shell script called `hello_devops.sh` Once the repository is created, use you code editor to write your first shell script called `hello-devops.sh`
When executed, this script must print `Hello 01-user!`, where `01-user` is your username. When executed, this script must print `Hello 01-user!`, where `01-user` is your username.
@ -37,22 +37,22 @@ When executed, this script must print `Hello 01-user!`, where `01-user` is your
If the username is `01-user`: If the username is `01-user`:
```console ```console
$ bash hello_devops.sh $ bash hello-devops.sh
Hello 01-user! Hello 01-user!
$ $
``` ```
#### 3- go-say-hello #### 3- go-say-hello
After that the `hello_devops.sh` is executing correctly, it needs to be uploaded to the repository with the following commands: After that the `hello-devops.sh` is executing correctly, it needs to be uploaded to the repository with the following commands:
1. `git add hello_devops.sh` 1. `git add hello-devops.sh`
2. `git commit -m "My very first commit"` 2. `git commit -m "My very first commit"`
3. `git push` 3. `git push`
Once these steps are applied, the file can now be submitted for grading on the platform by clicking on the "RUN INTRODUCTION TEST" button. Once these steps are applied, the file can now be submitted for grading on the platform by clicking on the "RUN INTRODUCTION TEST" button.
This action will run the tests on your submitted `hello_devops.sh` file. This action will run the tests on your submitted `hello-devops.sh` file.
### Recommendation ### Recommendation

Loading…
Cancel
Save