Skip to content

Commit

Permalink
Add project property file to Spring Monitor (#41379)
Browse files Browse the repository at this point in the history
  • Loading branch information
jeanbisutti authored Jul 31, 2024
1 parent d8c060c commit 4f77770
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
{
"resources": {
"includes": [
{
"pattern": "\\Qazure-spring-cloud-azure-starter-monitor.properties\\E"
}
]
},
"bundles": []
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
name=${project.artifactId}
version=${project.version}
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
package com.azure.monitor.applicationinsights.spring;

import com.azure.core.util.CoreUtils;
import org.junit.jupiter.api.Test;

import java.util.Map;

import static org.assertj.core.api.Assertions.assertThat;

class SpringMonitorPropertyFileTest {

@Test
void shouldContainProjectProperties() {
Map<String, String> properties =
CoreUtils.getProperties("azure-spring-cloud-azure-starter-monitor.properties");

assertThat(properties).hasFieldOrPropertyWithValue("name", "spring-cloud-azure-starter-monitor");
assertThat(properties).hasEntrySatisfying("version", value -> assertThat(value).matches("[0-9].[0-9].[0-9].*"));
}
}

0 comments on commit 4f77770

Please sign in to comment.