github.com/caos/orbos@v1.5.14-0.20221103111702-e6cd0cea7ad4/cypress/integration/ORBOS/orbctl/orbctl.js (about) 1 describe('install orbctl', { execTimeout: 90000 }, () => { 2 // prepare orbctl, download and configuration 3 it('download orbctl', () => { 4 //cy.exec('if [ -f "./orbctl" ]; then rm ./orbctl fi').its('code').should('eq', 0) 5 cy.exec('curl -s https://api.github.com/repos/caos/orbos/releases/latest | grep "browser_download_url.*orbctl-$(uname)-$(uname -m)" | cut -d \'\"\' -f 4 | wget -i - -O ./orbctl ').its('code').should('eq', 0) 6 cy.exec('ls ./orbctl').its('code').should('eq', 0) 7 }) 8 it('chmod orbctl', () => { 9 cy.exec('chmod +x ./orbctl ').its('code').should('eq', 0) 10 }) 11 it('create orbfile', () => { 12 //cy.exec('if [[ -f "~/.orb/config" ]]; then rm ~/.orb/config fi').its('code').should('eq', 0) 13 cy.exec('./orbctl --gitops configure --repourl "git@github.com:caos/cypress-ops.git" --masterkey "$(openssl rand -base64 21)"').its('code').should('eq', 0) 14 cy.exec('ls ~/.orb/config').its('code').should('eq', 0) 15 }) 16 }) 17 18 describe('orbctl tests', { execTimeout: 90000 }, () => { 19 // basic orbctl operations 20 it('orbctl help', () => { 21 cy.exec('./orbctl help').its('code').should('eq', 0) 22 }) 23 it('orbctl read gpg key from git repository', () => { 24 cy.exec('./orbctl readsecret --gitops boom.argocd.gopass.secrets-demo.gpg.encrypted').its('code').should('eq', 0) 25 }) 26 }) 27 28 describe('orbctl takeoff', { execTimeout: 900000 }, () => { 29 // orbctl takeoff 30 it('orbctl --gitops takeoff', () => { 31 cy.exec('./orbctl takeoff --gitops').its('code').should('eq', 0) 32 }) 33 })