The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/public/app/plugins/datasource/cloudwatch/aws_url.test.ts

18 lines
642 B

import { getLogsEndpoint } from './aws_url';
describe('getEndpoint', () => {
it('should return the default url for normal regions', () => {
const result = getLogsEndpoint('us-east-1');
expect(result).toBe('us-east-1.console.aws.amazon.com');
});
it('should return the us-gov url for us-gov regions', () => {
const result = getLogsEndpoint('us-gov-east-1');
expect(result).toBe('us-gov-east-1.console.amazonaws-us-gov.com');
});
it('should return the china url for cn regions', () => {
const result = getLogsEndpoint('cn-northwest-1');
expect(result).toBe('cn-northwest-1.console.amazonaws.cn');
});
});