|
| 1 | +# Copyright 2020 Amazon.com, Inc. or its affiliates. All Rights Reserved. |
| 2 | +# |
| 3 | +# Licensed under the Apache License, Version 2.0 (the "License"). You |
| 4 | +# may not use this file except in compliance with the License. A copy of |
| 5 | +# the License is located at |
| 6 | +# |
| 7 | +# http://aws.amazon.com/apache2.0/ |
| 8 | +# |
| 9 | +# or in the "license" file accompanying this file. This file is |
| 10 | +# distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF |
| 11 | +# ANY KIND, either express or implied. See the License for the specific |
| 12 | +# language governing permissions and limitations under the License. |
| 13 | +from __future__ import absolute_import |
| 14 | + |
| 15 | +from sagemaker import image_uris |
| 16 | +from tests.unit.sagemaker.image_uris import expected_uris, regions |
| 17 | + |
| 18 | +ACCOUNTS = { |
| 19 | + "ap-east-1": "199566480951", |
| 20 | + "ap-northeast-1": "430734990657", |
| 21 | + "ap-northeast-2": "578805364391", |
| 22 | + "ap-south-1": "904829902805", |
| 23 | + "ap-southeast-1": "972752614525", |
| 24 | + "ap-southeast-2": "184798709955", |
| 25 | + "ca-central-1": "519511493484", |
| 26 | + "cn-north-1": "618459771430", |
| 27 | + "cn-northwest-1": "658757709296", |
| 28 | + "eu-central-1": "482524230118", |
| 29 | + "eu-north-1": "314864569078", |
| 30 | + "eu-west-1": "929884845733", |
| 31 | + "eu-west-2": "250201462417", |
| 32 | + "eu-west-3": "447278800020", |
| 33 | + "me-south-1": "986000313247", |
| 34 | + "sa-east-1": "818342061345", |
| 35 | + "us-east-1": "199566480951", |
| 36 | + "us-east-2": "915447279597", |
| 37 | + "us-west-1": "685455198987", |
| 38 | + "us-west-2": "895741380848", |
| 39 | +} |
| 40 | + |
| 41 | + |
| 42 | +def test_debugger(): |
| 43 | + for region in regions.regions(): |
| 44 | + if region in ACCOUNTS.keys(): |
| 45 | + uri = image_uris.retrieve("debugger", region=region) |
| 46 | + |
| 47 | + expected = expected_uris.algo_uri( |
| 48 | + "sagemaker-debugger-rules", ACCOUNTS[region], region, version="latest" |
| 49 | + ) |
| 50 | + assert expected == uri |
0 commit comments