Skip to content

Commit eb659e5

Browse files
committed
fix dd integ tests
1 parent c3d1b33 commit eb659e5

File tree

1 file changed

+7
-13
lines changed

1 file changed

+7
-13
lines changed

tests/integ/test_processing.py

Lines changed: 7 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -732,16 +732,10 @@ def test_processing_job_inputs_and_output_config(
732732
)
733733

734734
job_description = script_processor.latest_job.describe()
735-
expected_inputs_and_outputs = _get_processing_job_inputs_and_outputs()
736-
print("###")
737-
print(job_description["ProcessingInputs"][:-1])
738-
print(expected_inputs_and_outputs["ProcessingInputs"])
735+
expected_inputs_and_outputs = _get_processing_job_inputs_and_outputs(sagemaker_session.default_bucket(), output_kms_key)
739736
assert (
740737
job_description["ProcessingInputs"][:-1] == expected_inputs_and_outputs["ProcessingInputs"]
741738
)
742-
print("###")
743-
print(job_description["ProcessingOutputConfig"])
744-
print(expected_inputs_and_outputs["ProcessingOutputConfig"])
745739
assert (
746740
job_description["ProcessingOutputConfig"]
747741
== expected_inputs_and_outputs["ProcessingOutputConfig"]
@@ -815,14 +809,14 @@ def _get_processing_outputs_with_all_parameters():
815809
]
816810

817811

818-
def _get_processing_job_inputs_and_outputs():
812+
def _get_processing_job_inputs_and_outputs(bucket, output_kms_key):
819813
return {
820814
"ProcessingInputs": [
821815
{
822816
"InputName": "my_dataset",
823817
"AppManaged": False,
824818
"S3Input": {
825-
"S3Uri": "s3://sagemaker-us-west-2-790336243319",
819+
"S3Uri": f"s3://{bucket}",
826820
"LocalPath": "/opt/ml/processing/input/data/",
827821
"S3DataType": "S3Prefix",
828822
"S3InputMode": "File",
@@ -834,7 +828,7 @@ def _get_processing_job_inputs_and_outputs():
834828
"InputName": "s3_input",
835829
"AppManaged": False,
836830
"S3Input": {
837-
"S3Uri": "s3://sagemaker-us-west-2-790336243319",
831+
"S3Uri": f"s3://{bucket}",
838832
"LocalPath": "/opt/ml/processing/input/s3_input",
839833
"S3DataType": "S3Prefix",
840834
"S3InputMode": "File",
@@ -852,7 +846,7 @@ def _get_processing_job_inputs_and_outputs():
852846
"DbUser": "awsuser",
853847
"QueryString": "SELECT * FROM shoes",
854848
"ClusterRoleArn": "arn:aws:iam::037210630505:role/RedshiftClusterRole-prod-us-west-2",
855-
"OutputS3Uri": "s3://sagemaker-us-west-2-790336243319/rdd",
849+
"OutputS3Uri": f"s3://{bucket}/rdd",
856850
"OutputFormat": "CSV",
857851
"OutputCompression": "None",
858852
},
@@ -870,7 +864,7 @@ def _get_processing_job_inputs_and_outputs():
870864
"Database": "default",
871865
"QueryString": 'SELECT * FROM "default"."s3_test_table_$STAGE_$REGIONUNDERSCORED";',
872866
"WorkGroup": "workgroup",
873-
"OutputS3Uri": "s3://sagemaker-us-west-2-790336243319/add",
867+
"OutputS3Uri": f"s3://{bucket}/add",
874868
"OutputFormat": "JSON",
875869
"OutputCompression": "GZIP",
876870
},
@@ -888,6 +882,6 @@ def _get_processing_job_inputs_and_outputs():
888882
"AppManaged": True,
889883
}
890884
],
891-
"KmsKeyId": "arn:aws:kms:us-west-2:790336243319:key/e4d2e5b5-346f-42cf-a8a7-60f18054893c",
885+
"KmsKeyId": output_kms_key,
892886
},
893887
}

0 commit comments

Comments
 (0)