Commit 63b7f5e3 authored by H. Fischer's avatar H. Fischer Committed by Jakob Moser
Browse files

Put long validation scripts into files #54

parent 2ca82d08
Loading
Loading
Loading
Loading
+21 −9
Original line number Diff line number Diff line
@@ -212,8 +212,12 @@ export const pooltest = test("Pooltest Sommersemester 2022", async function () {
    
        await this.manualConfirmation()

        this.verify(`if ( ! [ -d /resources/stuff/to ] &&
                    [ -f /resources/stuff/b_file.png ] ); then echo "yes"; else echo "no"; fi`).hasOutput("yes")
        await this.prepareWith(`mkdir -p /val &&
                                echo 'if ( ! [ -d /resources/stuff/to ] &&
                                           [ -f /resources/stuff/b_file.png ] ); then echo "yes"; else echo "no"; fi' > /val/18ne2x.sh &&
                                chmod a+x /val/18ne2x.sh`)
    
        this.verify('/val/18ne2x.sh').hasOutput("yes")
    })
    
    this.exercise("Textdateien lesen und schreiben", async function () {
@@ -265,12 +269,16 @@ export const pooltest = test("Pooltest Sommersemester 2022", async function () {

        await this.manualConfirmation()

        this.verify(`if ( ! [ -f /resources/Contacts/unsure/technik@cl.uni-heidelberg.de ] &&
        await this.prepareWith(`mkdir -p /val &&
                                echo 'if ( ! [ -f /resources/Contacts/unsure/technik@cl.uni-heidelberg.de ] &&
                                           ! [ -f /resources/Contacts/unsure/it-support@cl.uni-heidelberg.de ] &&
                                           ! [ -f /resources/Contacts/unsure/technik-gruppe@cl.uni-heidelberg.de ] &&
                                           ! [ -f /resources/Contacts/technik-gruppe@cl.uni-heidelberg.de ] &&
                                           ! [ -f /resources/Contacts/it-support@cl.uni-heidelberg.de ] &&
                            [ -f /resources/Contacts/technik@cl.uni-heidelberg.de ] ); then echo 'yes'; else echo 'no'; fi`).hasOutput("yes")
                                           [ -f /resources/Contacts/technik@cl.uni-heidelberg.de ] ); then echo "yes"; else echo "no"; fi' > /val/2bx821.sh &&
                                chmod a+x /val/2bx821.sh`)

        this.verify('/val/2bx821.sh').hasOutput("yes")
    })

    this.exercise("Kopieren vieler Dateien in ein neues Verzeichnis", async function () {
@@ -290,7 +298,11 @@ export const pooltest = test("Pooltest Sommersemester 2022", async function () {

        await this.manualConfirmation()

        this.verify("diff -r /resources/so_much /root/much &> /dev/null; if [ $? == 0 ]; then echo 'yes'; else echo 'no'; fi").hasOutput("yes")
        await this.prepareWith(`mkdir -p /val &&
                                echo 'diff -r /resources/so_much /root/much &> /dev/null; if [ $? == 0 ]; then echo "yes"; else echo "no"; fi' > /val/3w8ocm.sh &&
                                chmod a+x /val/3w8ocm.sh`)

        this.verify('/val/3w8ocm.sh').hasOutput("yes")
    })

    this.exercise("Berechtigungen einer versteckten Datei herausfinden", async function () {