|
| 1 | +package identity |
| 2 | + |
| 3 | +import ( |
| 4 | + "github.com/konveyor/tackle2-hub/api" |
| 5 | +) |
| 6 | + |
| 7 | +// Set of valid resources for tests and reuse. |
| 8 | +var ( |
| 9 | + GitPw = api.Identity{ |
| 10 | + Kind: "git", |
| 11 | + Name: "git-pw", |
| 12 | + User: "test-user", |
| 13 | + Password: "test-password-123", |
| 14 | + } |
| 15 | + GitKey = api.Identity{ |
| 16 | + Kind: "git", |
| 17 | + Name: "git-key", |
| 18 | + User: "test-user", |
| 19 | + Key: /* The key was generated only for test purposes, not used anywhere, gitleaks:allow */ `-----BEGIN OPENSSH PRIVATE KEY----- |
| 20 | + b3BlbnNzaC1rZXktdjEAAAAABG5vbmUAAAAEbm9uZQAAAAAAAAABAAAAlwAAAAdzc2gtcn |
| 21 | + NhAAAAAwEAAQAAAIEAoDrNL4XSvv5xgPX4ty4nZFn+5nTG9F9Kvx8u+eNN2CdTKjzFUr0N |
| 22 | + HYFfiBo98RyZO67plzQVi7hK+ooUTAdt+eU6bgF23VF62Cd8GT/l2AMB73tTedEYVmsOi5 |
| 23 | + aJwJV3BaLWmgEbg3YqbtJWeYHloWV1myC7ChYFIqgNgq/NikcAAAIAQpLNF0KSzRcAAAAH |
| 24 | + c3NoLXJzYQAAAIEAoDrNL4XSvv5xgPX4ty4nZFn+5nTG9F9Kvx8u+eNN2CdTKjzFUr0NHY |
| 25 | + FfiBo98RyZO67plzQVi7hK+ooUTAdt+eU6bgF23VF62Cd8GT/l2AMB73tTedEYVmsOi5aJ |
| 26 | + wJV3BaLWmgEbg3YqbtJWeYHloWV1myC7ChYFIqgNgq/NikcAAAADAQABAAAAgC9qd0Hy9j |
| 27 | + SzE1+4aou6ysl1oGsOb7ntYS9BySMF0wl+SawcI8CiVXk/ycd7DI2HiwkQb+vg6+dW+ElA |
| 28 | + B1WgdTigUZjmhJ8nAFgebav8PbTDc2izFGu31jLeP6dyLRcRG/ztcOvsglloh9Oj//jKzb |
| 29 | + YBpKlhIaJbnmVokx0NgAMxAAAAQQCc8TsykYsJQz8R2MpddptTlIStFRIvt7bVcwZ8Hrr5 |
| 30 | + M8XT3aCxABvtcRgY++/VDZBkK+TNfcdWSS+1Cxrmp/X2AAAAQQDT109BFaf9bbmOdipdyd |
| 31 | + nXFhQgxwZ2HbCBtMmOR2zEosCPDNf2c7McFTAOCM3Mh0qNlZPPbUL1v2TVWvDi9NQjAAAA |
| 32 | + QQDBoU1fSYFq+Rf2Dyrq9RevXT4VO+uahlje46zV2sVA6Mg2lc+yqTbTIv9NvxnJMC51vO |
| 33 | + B1q2YQPNuJWgd03jGNAAAACm1hdWZhcnRAbmI= |
| 34 | + -----END OPENSSH PRIVATE KEY----- |
| 35 | + `, |
| 36 | + } |
| 37 | + Mvn = api.Identity{ |
| 38 | + Kind: "mvn", |
| 39 | + Name: "mvn-settings", |
| 40 | + Settings: `<?xml version="1.0" encoding="UTF-8"?> |
| 41 | + <settings xmlns="http://maven.apache.org/SETTINGS/1.2.0" |
| 42 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| 43 | + xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.2.0 http://maven.apache.org/xsd/settings-1.2.0.xsd"> |
| 44 | + <pluginGroups> |
| 45 | + </pluginGroups> |
| 46 | + <proxies> |
| 47 | + </proxies> |
| 48 | + <servers> |
| 49 | + <server> |
| 50 | + <id>tackle-testapp</id> |
| 51 | + <username>GITHUB_USER</username> |
| 52 | + <password>GITHUB_TOKEN</password> |
| 53 | + </server> |
| 54 | + </servers> |
| 55 | + <mirrors> |
| 56 | + <mirror> |
| 57 | + <id>maven-default-http-blocker</id> |
| 58 | + <mirrorOf>external:http:*</mirrorOf> |
| 59 | + <name>Pseudo repository to mirror external repositories initially using HTTP.</name> |
| 60 | + <url>http://0.0.0.0/</url> |
| 61 | + <blocked>true</blocked> |
| 62 | + </mirror> |
| 63 | + </mirrors> |
| 64 | + <profiles> |
| 65 | + <profile> |
| 66 | + <id>github</id> |
| 67 | + <repositories> |
| 68 | + <repository> |
| 69 | + <id>central</id> |
| 70 | + <url>https://repo1.maven.org/maven2</url> |
| 71 | + </repository> |
| 72 | + <repository> |
| 73 | + <id>tackle-testapp</id> |
| 74 | + <url>https://maven.pkg.github.com/konveyor/tackle-testapp</url> |
| 75 | + <snapshots> |
| 76 | + <enabled>true</enabled> |
| 77 | + </snapshots> |
| 78 | + </repository> |
| 79 | + </repositories> |
| 80 | + </profile> |
| 81 | + </profiles> |
| 82 | + <activeProfiles> |
| 83 | + <activeProfile>github</activeProfile> |
| 84 | + </activeProfiles> |
| 85 | + </settings>`, |
| 86 | + } |
| 87 | + Samples = []api.Identity{GitPw, GitKey, Mvn} |
| 88 | +) |
0 commit comments