pick up credentials as system props/env

This commit is contained in:
Mohammad Derakhshani 2018-01-18 12:16:32 -08:00
Родитель 691d8d9dfb
Коммит eb80a3119e
3 изменённых файлов: 5 добавлений и 4 удалений

Просмотреть файл

@ -39,7 +39,10 @@ You can run the samples either using Eclipse or from Command Line using Maven:
### Eclipse
* Load the main parent project pom file in Eclipse (That should automatically load documentdb-examples).
* Replace Emulator's endpoint in [src/test/java/com/microsoft/azure/documentdb/examples/AccountCredentials.java](https://github.com/Azure/azure-documentdb-java/blob/master/documentdb-examples/src/test/java/com/microsoft/azure/documentdb/examples/AccountCredentials.java) with your own Azure Cosmos DB Prod Endpoint.
* For running the samples you need a proper Azure Cosmos DB Endpoint. The endpoints are picked up from [src/test/java/com/microsoft/azure/documentdb/examples/AccountCredentials.java](https://github.com/Azure/azure-documentdb-java/blob/master/documentdb-examples/src/test/java/com/microsoft/azure/documentdb/examples/AccountCredentials.java).
** You can pass your endpoint credentials as VM Arguments in Eclipse JUnit Run Config:
-DACCOUNT_HOST="https://REPLACE_ME.documents.azure.com:443/" -DACCOUNT_KEY="REPLACE_ME"
** or you can simply put your endpoint credentials in AccountCredentials.java
* Now you can run the samples as JUnit tests in Eclipse.
### Command line
@ -50,7 +53,7 @@ The other way for running samples is to use maven:
* Now Run Maven:
```bash
mvn clean package
mvn test -DACCOUNT_HOST="https://REPLACE_ME_WITH_YOURS.documents.azure.com:443/" -DACCOUNT_KEY="REPLACE_ME_WITH_YOURS"
```
## Usage

Просмотреть файл

@ -28,7 +28,6 @@
<configuration>
<includes>
<include>**/*Test*.java</include>
<include>**/*Samples*.java</include>
<include>**/*Sample*.java</include>
</includes>
</configuration>

Просмотреть файл

@ -22,7 +22,6 @@
<configuration>
<includes>
<include>**/*Test*.java</include>
<include>**/*Samples*.java</include>
<include>**/*Sample*.java</include>
</includes>
</configuration>