File tree Expand file tree Collapse file tree 1 file changed +11
-2
lines changed
src/Tests/Framework/ManagedElasticsearch/Clusters Expand file tree Collapse file tree 1 file changed +11
-2
lines changed Original file line number Diff line number Diff line change 1- using Elastic . Managed . Ephemeral ;
1+ using System ;
2+ using System . IO ;
3+ using Elastic . Managed . Ephemeral ;
24using Elastic . Xunit ;
35using Elasticsearch . Net ;
46using Nest ;
@@ -13,8 +15,15 @@ public XPackClusterConfiguration() : this(ClusterFeatures.SSL | ClusterFeatures.
1315
1416 public XPackClusterConfiguration ( ClusterFeatures features ) : base ( ClusterFeatures . XPack | features , 1 )
1517 {
16- this . ShowElasticsearchOutputAfterStarted = false ;
18+ // Get license file path from environment variable
19+ var licenseFilePath = Environment . GetEnvironmentVariable ( "ES_LICENSE_FILE" ) ;
20+ if ( ! string . IsNullOrEmpty ( licenseFilePath ) && File . Exists ( licenseFilePath ) )
21+ {
22+ var licenseContents = File . ReadAllText ( licenseFilePath ) ;
23+ this . XPackLicenseJson = licenseContents ;
24+ }
1725
26+ this . ShowElasticsearchOutputAfterStarted = false ;
1827 this . AdditionalBeforeNodeStartedTasks . Add ( new EnsureWatcherActionConfigurationInElasticsearchYaml ( ) ) ;
1928 }
2029 }
You can’t perform that action at this time.
0 commit comments