Skip to content
Snippets Groups Projects
Select Git revision
  • 7856b94a074bc6687ed04c33bd6d178f0967c101
  • master default
  • M12
3 results

QuestionAnswer.json

Blame
  • test.sh 923 B
    #!/bin/bash
    
    logs=$(docker logs $SERVICE 2>&1)
    redis1="# oO0OoO0OoO0Oo Redis is starting oO0OoO0OoO0Oo"
    redis2="Ready to accept connections"
    scheduler="Registering birth"
    worker1="Worker rq:worker:"
    worker2="Listening on "
    oauth2token="Clouditor OAuth2 token endpoint not available"
    
    if ! [[ $logs =~ $redis1 ]]
        then
            echo "Redis server not started" 1>&2
            exit 1
    fi
    
    if ! [[ $logs =~ $redis2 ]]
        then
            echo "Redis server not started" 1>&2
            exit 1
    fi
    
    if ! [[ $logs =~ $scheduler ]]
        then
            echo "Redis queue scheduler not started" 1>&2
            exit 1
    fi
    
    if ! [[ $logs =~ $worker1 ]]
        then
            echo "Redis worker not started" 1>&2
            exit 1
    fi
    
    if ! [[ $logs =~ $worker2 ]]
        then
            echo "Redis worker not started" 1>&2
            exit 1
    fi
    
    if ! [[ $logs =~ $oauth2token ]]
        then
            echo "OAuth2 token authentication not working" 1>&2
            exit 1
    fi