sh install-docker.sh
- log out
- log back in
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
CONTAINER_NAME="your-container-name" | |
if [ ! "$(docker ps -q -f name=$CONTAINER_NAME)" ]; then | |
if [ "$(docker ps -aq -f status=exited -f name=$CONTAINER_NAME)" ]; then | |
# Start the container if it is stopped | |
docker start $CONTAINER_NAME | |
fi | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Install docker | |
apt-get update | |
apt-get install -y apt-transport-https ca-certificates curl software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - | |
add-apt-repository \ | |
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \ | |
$(lsb_release -cs) \ | |
stable" | |
apt-get update |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# the IP(s) on which your node server is running. I chose port 3000. | |
upstream app_geoforce { | |
server 127.0.0.1:3000; | |
} | |
upstream app_pcodes{ | |
server 127.0.0.1:3001; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
export PATH=/usr/local/bin:$PATH; | |
yum update | |
yum install docker -y | |
service docker start | |
# Docker login notes: | |
# - For no email, just put one blank space. | |
# - Also the private repo protocol and version are needed for docker | |
# to properly setup the .dockercfg file to work with compose |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
apt-get -y update | |
cat > /tmp/subscript.sh << EOF | |
# START UBUNTU USERSPACE | |
echo "Setting up NodeJS Environment" | |
curl -o- https://raw.githubusercontent.com/creationix/nvm/v0.33.9/install.sh | bash | |
echo 'export NVM_DIR="/home/ubuntu/.nvm"' >> /home/ubuntu/.bashrc | |
echo '[ -s "$NVM_DIR/nvm.sh" ] && . "$NVM_DIR/nvm.sh" # This loads nvm' >> /home/ubuntu/.bashrc | |
# Dot source the files to ensure that variables are available within the current shell | |
. /home/ubuntu/.nvm/nvm.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Cypress.Commands.add("Login", () => { //Making A custom command for loggin in to the application | |
cy.request({ | |
method: 'POST', | |
url: '/users/authenticate', // Base URL will be prepended which is decalred in cypress.json | |
body: { //Passing Email and Password for log in | |
"email": "{email}", | |
"password": "{pass}" | |
} | |
}).then(($body) => { //Assertion for Response status should be 200 | |
if (expect($body.status).to.eq(200)) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
describe('Make Custom Command and Using in regular test script', () => { | |
before('Calling Custom command before making any User actions', () => { | |
cy.Login() | |
}) | |
it('Test Script',() => { | |
//Test Script starts | |
cy.visit('http://localhost:8080') | |
}) | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { | |
Login | |
} from '../../support/login-po.js'; | |
var login = new Login(); | |
describe('Sanity E2E Test suite for Login page ', () => { | |
before('Visit Login page', () => { | |
cy.visit('/login') //Visiting login page before a test run | |
}) | |
it('Verify if User can login', () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class Login { | |
getUsername(){ | |
return cy | |
.get(':nth-child(1) > .form-control') | |
} | |
getPassword(){ | |
return cy | |
.get(':nth-child(2) > .form-control') | |
} | |
getSignupBtn(){ |
NewerOlder