Skip to content

Fix and expand manual tests with auth repo #403

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
36 changes: 32 additions & 4 deletions test/TestsReadme.md
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,11 @@ As of this writing, testing the credentials is only done manually with a dockeri
docker run --name artifactory -d -p 8081:8081 docker.bintray.io/jfrog/artifactory-oss:latest

# Copy preconfigured gloabl config (with custom repo) and security config (with credentials user) into container.
docker cp ./test/resources/artifactory_config/artifactory.config.xml artifactory:/var/opt/jfrog/artifactory/etc/artifactory.config.import.xml
docker cp ./test/resources/artifactory_config/security_descriptor.xml artifactory:/var/opt/jfrog/artifactory/etc/security.import.xml
docker cp ./test/resources/artifactory_config/artifactory.config.xml artifactory:/var/opt/jfrog/artifactory/etc/artifactory/artifactory.config.import.xml
docker cp ./test/resources/artifactory_config/security_descriptor.xml artifactory:/var/opt/jfrog/artifactory/etc/artifactory/security.import.xml

# Make the configs accessable
docker exec -u 0 -it artifactory sh -c 'chmod 777 $ARTIFACTORY_HOME/etc/*.import.xml'
docker exec -u 0 -it artifactory sh -c 'chmod 777 /var/opt/jfrog/artifactory/etc/artifactory/*.import.xml'

# Restart docker after is done with initial booting (otherwise restart breaks the container).
echo "sleeping for 15..." && sleep 15
Expand All @@ -189,7 +189,35 @@ echo '
@file:DependsOn("com.jcabi:jcabi-aether:0.10.1") // If unencrypted works via jcenter
@file:DependsOnMaven("group:somejar:1.0") // If encrypted works.
println("Hello, World!")
' | kscript -
' | kscript -c -
```

#### 4. Test environment variable substitution

```bash
export auth_user="auth_user"
export auth_password="password"

echo '
@file:Repository("http://localhost:8081/artifactory/authenticated_repo", user="{{auth_user}}", password="{{auth_password}}")
@file:DependsOn("com.jcabi:jcabi-aether:0.10.1") // If unencrypted works via jcenter
@file:DependsOnMaven("group:somejar:1.0") // If encrypted works.
println("Hello, World!")
' | kscript -c -
```

#### 5. Test environment variable substitution with packaging

```bash
export auth_user="auth_user"
export auth_password="password"

echo '
@file:Repository("http://localhost:8081/artifactory/authenticated_repo", user="{{auth_user}}", password="{{auth_password}}")
@file:DependsOn("com.jcabi:jcabi-aether:0.10.1") // If unencrypted works via jcenter
@file:DependsOnMaven("group:somejar:1.0") // If encrypted works.
println("Hello, World!")
' | kscript -c --package -
```

### Additional info for manual testing
Expand Down