Skip to content

Commit

Permalink
mulitple languages: datastore -> data store in HealthImaging texts (#…
Browse files Browse the repository at this point in the history
…5430)

Change datastore to data store where appropriate.
  • Loading branch information
meyertst-aws authored and ford-at-aws committed Dec 15, 2023
1 parent 3126eb5 commit 0c32cf9
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
10 changes: 5 additions & 5 deletions aws-cli/bash-linux/medical-imaging/medical_imaging_operations.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ function imaging_create_datastore() {
export OPTIND=1

if [[ -z "$datastore_name" ]]; then
errecho "ERROR: You must provide a datastore name with the -n parameter."
errecho "ERROR: You must provide a data store name with the -n parameter."
usage
return 1
fi
Expand Down Expand Up @@ -148,7 +148,7 @@ function imaging_list_datastores() {
###############################################################################
# function imaging_get_datastore
#
# Get a datastore properties.
# Get a data store's properties.
#
# Parameters:
# -i data_store_id - The ID of the data store.
Expand All @@ -165,7 +165,7 @@ function imaging_get_datastore() {
# bashsupport disable=BP5008
function usage() {
echo "function imaging_get_datastore"
echo "Gets a datastore properties."
echo "Gets a data store's properties."
echo " -i datastore_id - The ID of the data store."
echo ""
}
Expand All @@ -188,7 +188,7 @@ function imaging_get_datastore() {
export OPTIND=1

if [[ -z "$datastore_id" ]]; then
errecho "ERROR: You must provide a datastore ID with the -i parameter."
errecho "ERROR: You must provide a data store ID with the -i parameter."
usage
return 1
fi
Expand Down Expand Up @@ -258,7 +258,7 @@ function imaging_delete_datastore() {
export OPTIND=1

if [[ -z "$datastore_id" ]]; then
errecho "ERROR: You must provide a datastore ID with the -i parameter."
errecho "ERROR: You must provide a data store ID with the -i parameter."
usage
return 1
fi
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export VERBOSE=false

local test_count=0

run_test "$test_count Create a datastore" \
run_test "$test_count Create a data store" \
"imaging_create_datastore -n $datastore_name " \
0
test_count=$((test_count + 1))
Expand All @@ -116,30 +116,30 @@ export VERBOSE=false
done <<<"$datastore_list"

if [ "$data_store_found" == "false" ]; then
test_failed "Datastore id $datastore_id not found in list datastores response. $datastore_list"
test_failed "Datastore id $datastore_id not found in list-datastores response. $datastore_list"
fi

test_count=$((test_count + 1))

run_test "$test_count. Get a datastore" \
run_test "$test_count. Get a data store" \
"imaging_get_datastore -i $datastore_id " \
0

IFS=$'\t' read -ra datastore_get_result <<<"$test_command_response"
if [ "${#datastore_get_result[@]}" -ne 6 ]; then
test_failed "Incorrect number of entries in get datastore response. ${#datastore_get_result[@]}}"
test_failed "Incorrect number of entries in get-datastore response. ${#datastore_get_result[@]}}"
fi

local retrieved_datastore_id="${datastore_get_result[1]}"
if [ "$retrieved_datastore_id" != "$datastore_id" ]; then
test_failed "Incorrect datastore id in get datastore response. ${#datastore_get_result[@]}"
test_failed "Incorrect data store id in get-datastore response. ${#datastore_get_result[@]}"
fi

test_count=$((test_count + 1))

sleep 10

run_test "$test_count. Delete a datastore" \
run_test "$test_count. Delete a data store" \
"imaging_delete_datastore -i $datastore_id " \
0
test_count=$((test_count + 1))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {CreateDatastoreCommand} from "@aws-sdk/client-medical-imaging";
import {medicalImagingClient} from "../libs/medicalImagingClient.js";

/**
* @param {string} datastoreName - The name of the datastore to create.
* @param {string} datastoreName - The name of the data store to create.
*/
export const createDatastore = async (datastoreName = "DATASTORE_NAME") => {
const response = await medicalImagingClient.send(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {DeleteDatastoreCommand} from "@aws-sdk/client-medical-imaging";
import {medicalImagingClient} from "../libs/medicalImagingClient.js";

/**
* @param {string} datastoreID - The ID of the datastore to create.
* @param {string} datastoreID - The ID of the data store to delete.
*/
export const deleteDatastore = async (datastoreID = "DATASTORE_ID") => {
const response = await medicalImagingClient.send(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import {GetDatastoreCommand} from "@aws-sdk/client-medical-imaging";
import {medicalImagingClient} from "../libs/medicalImagingClient.js";

/**
* @param {string} datastoreID - The ID of the datastore to retrieve properties for.
* @param {string} datastoreID - The ID of the data store to retrieve properties for.
*/
export const getDatastore = async (datastoreID = "DATASTORE_ID") => {
const response = await medicalImagingClient.send(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ describe("createDatastore/deleteDatastore", () => {
let datastoreID = "";
const datastoreName = "createDeleteDatastoreJSTest";

it("should create and delete a datastore", async () => {
it("should create and delete a data store", async () => {
// Create topic.
const createDatastoreCommandOutput = await createDatastore(datastoreName);
datastoreID = createDatastoreCommandOutput.datastoreId;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {describe, it, expect} from "vitest";
import {getDatastore} from "../actions/get-datastore.js";

describe("getDatastore", () => {
it("should throw an error with the default fake datastore ID", async () => {
it("should throw an error with the default fake data store ID", async () => {
try {
await getDatastore();
} catch (err) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[CreateDataStore.java demonstrates how to create a datastore in AWS HealthImaging.]
//snippet-sourcedescription:[CreateDataStore.java demonstrates how to create a data store in AWS HealthImaging.]
//snippet-keyword:[AWS SDK for Java v2]
//snippet-keyword:[AWS HealthImaging]

Expand Down Expand Up @@ -34,7 +34,7 @@ public static void main(String[] args) {
"Usage:\n" +
" <dataStoreName>\n\n" +
"Where:\n" +
" dataStoreName - The name for the AWS HealthImaging datastore.\n\n";
" dataStoreName - The name for the AWS HealthImaging data store.\n\n";

if (args.length != 1) {
System.out.println(usage);
Expand All @@ -50,7 +50,7 @@ public static void main(String[] args) {
.build();

String dataStoreId = createMedicalImageDatastore(medicalImagingClient, dataStoreName);
System.out.println("The medical imaging datastore id is " + dataStoreId);
System.out.println("The medical imaging data store id is " + dataStoreId);
medicalImagingClient.close();
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[DeleteDatastore.java demonstrates how to delete a datastore in AWS HealthImaging.]
//snippet-sourcedescription:[DeleteDatastore.java demonstrates how to delete a data store in AWS HealthImaging.]
//snippet-keyword:[AWS SDK for Java v2]
//snippet-keyword:[AWS HealthImaging]

Expand Down Expand Up @@ -33,7 +33,7 @@ public static void main(String[] args) {
"Usage:\n" +
" <dataStoreID>\n\n" +
"Where:\n" +
" dataStoreID - The ID for the AWS HealthImaging datastore to delete.\n\n";
" dataStoreID - The ID for the AWS HealthImaging data store to delete.\n\n";

if (args.length != 1) {
System.out.println(usage);
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
//snippet-sourcedescription:[GetDataStore.java demonstrates how to get a datastore's pproperties in AWS HealthImaging.]
//snippet-sourcedescription:[GetDataStore.java demonstrates how to get a data store's pproperties in AWS HealthImaging.]
//snippet-keyword:[AWS SDK for Java v2]
//snippet-keyword:[AWS HealthImaging]

Expand Down Expand Up @@ -35,7 +35,7 @@ public static void main(String[] args) {
"Usage:\n" +
" <datastoreID>\n\n" +
"Where:\n" +
" datastoreID - The ID for the AWS HealthImaging datastore.\n\n";
" datastoreID - The ID for the AWS HealthImaging data store.\n\n";

if (args.length != 1) {
System.out.println(usage);
Expand All @@ -52,7 +52,7 @@ public static void main(String[] args) {

DatastoreProperties properties = getMedicalImageDatastore(medicalImagingClient, datastoreID);
if (properties != null) {
System.out.println("The medical imaging datastore properties are " + properties);
System.out.println("The medical imaging data store properties are " + properties);
}
medicalImagingClient.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ public static void main(String[] args) {

List<DatastoreSummary> datastoreSummaries = listMedicalImagingDatastores(medicalImagingClient);
if (datastoreSummaries != null) {
System.out.println("The medical imaging datastore properties are " + datastoreSummaries);
System.out.println("The medical imaging data store properties are " + datastoreSummaries);
}
medicalImagingClient.close();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ public void createDatastoreTest() {
assertDoesNotThrow(() -> datastoreID = CreateDatastore.createMedicalImageDatastore(medicalImagingClient, datastoreName));
assertFalse(datastoreID.isEmpty());

// Sleep for 10 seconds to give time for the datastore to be created
// Sleep for 10 seconds to give time for the data store to be created
try {
Thread.sleep(10000);
} catch (java.lang.InterruptedException e) {
Expand Down

0 comments on commit 0c32cf9

Please sign in to comment.