@@ -13,34 +13,21 @@ public class Credentials {
1313 private static String envChecker () {
1414 String githubActions = System .getenv ("GITHUB_ACTIONS" );
1515 if (githubActions != null && githubActions .equals ("true" )) {
16- System .out .println ("Tests are running in GitHub Actions environment." );
17- String mySecretKey = System .getenv ("API_KEY" );
1816 return "GitHub" ;
1917 } else {
20- System .out .println ("Tests are running in a local environment." );
2118 return "local" ;
2219 }
2320 }
2421
2522 public static Dotenv getEnv () {
26- String currentDirectory = System .getProperty ("user.dir" );
27- File envFile = new File (currentDirectory , "env" );
2823 env = Dotenv .configure ()
2924 .directory ("src/test/resources" )
3025 .filename ("env" ) // instead of '.env', use 'env'
3126 .load ();
3227 try {
3328 env = Dotenv .load ();
3429 } catch (DotenvException ex ) {
35- System .out .println ("Could not load from local .env" );
36- // File envFile = new File(currentDirectory, ".env");
37- // try {
38- // // Create .env file in the current directory
39- // envFile.createNewFile();
40- // } catch (IOException e) {
41- // System.err.println("An error occurred while creating .env file.");
42- // e.printStackTrace();
43- // }
30+ System .out .println ("Could not load.env" );
4431 }
4532 return env ;
4633 }
@@ -64,7 +51,6 @@ private Credentials() throws AccessException {
6451 public static Stack getStack () {
6552 if (stack == null ) {
6653 var envCheck = envChecker ();
67- System .out .println ("idendified env file detected " + envCheck );
6854 synchronized (Credentials .class ) {
6955 if (stack == null ) {
7056 try {
0 commit comments