Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Grodien committed Oct 29, 2024
1 parent 9f9b211 commit b072e81
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 7 deletions.
13 changes: 12 additions & 1 deletion das_client/analysis_options.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,27 @@ linter:
# The lint rules applied to this project can be customized in the
# section below to disable rules from the `package:flutter_lints/flutter.yaml`
# included above or to enable additional rules. A list of all available lints
# and their documentation is published at https://dart.dev/lints.
# and their documentation is published at
# https://dart-lang.github.io/linter/lints/index.html.
#
# Instead of disabling a lint rule for the entire project in the
# section below, it can also be suppressed for a single line of code
# or a specific dart file by using the `// ignore: name_of_lint` and
# `// ignore_for_file: name_of_lint` syntax on the line or in the file
# producing the lint.
rules:
always_use_package_imports: true
constant_identifier_names: false
library_prefixes: false
unnecessary_library_name: false
# avoid_print: false # Uncomment to disable the `avoid_print` rule
# prefer_single_quotes: true # Uncomment to enable the `prefer_single_quotes` rule

# Additional information about this file can be found at
# https://dart.dev/guides/language/analysis-options
analyzer:
exclude:
- lib/**.g.dart
- test/**.mocks.dart
errors:
invalid_annotation_target: ignore
5 changes: 4 additions & 1 deletion das_client/lib/flavor.dart
Original file line number Diff line number Diff line change
Expand Up @@ -13,20 +13,23 @@ enum Flavor {
authenticatorConfig: _authenticatorConfigMockDev,
tmsAuthenticatorConfig: _authenticatorConfigTmsDev,
backendUrl: 'https://das-backend-dev.app.sbb.ch',
mqttTopicPrefix: '',
),
inte(
displayName: 'Inte',
tokenExchangeUrl: 'https://sfera-mock.app.sbb.ch/customClaim/requestToken',
mqttUrl: 'wss://das-poc.messaging.solace.cloud',
authenticatorConfig: _authenticatorConfigInte,
backendUrl: 'https://das-backend-dev.app.sbb.ch',
mqttTopicPrefix: '',
),
prod(
displayName: 'Prod',
tokenExchangeUrl: 'https://sfera-mock.app.sbb.ch/customClaim/requestToken',
mqttUrl: 'wss://das-poc.messaging.solace.cloud',
authenticatorConfig: _authenticatorConfigProd,
backendUrl: 'https://das-backend-dev.app.sbb.ch',
mqttTopicPrefix: '',
);

const Flavor({
Expand All @@ -37,7 +40,7 @@ enum Flavor {
this.tmsMqttUrl,
required this.authenticatorConfig,
this.tmsAuthenticatorConfig,
this.mqttTopicPrefix = '',
required this.mqttTopicPrefix,
required this.backendUrl,
});

Expand Down
8 changes: 4 additions & 4 deletions das_client/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -352,10 +352,10 @@ packages:
dependency: "direct dev"
description:
name: flutter_lints
sha256: "3f41d009ba7172d5ff9be5f6e6e6abb4300e263aab8866d2a0842ed2a70f8f0c"
sha256: "5398f14efa795ffb7a33e9b6a08798b26a180edac4ad7db3f231e40f82ce11e1"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "5.0.0"
flutter_localizations:
dependency: "direct main"
description: flutter
Expand Down Expand Up @@ -577,10 +577,10 @@ packages:
dependency: transitive
description:
name: lints
sha256: "976c774dd944a42e83e2467f4cc670daef7eed6295b10b36ae8c85bcbf828235"
sha256: "3315600f3fb3b135be672bf4a178c55f274bebe368325ae18462c89ac1e3b413"
url: "https://pub.dev"
source: hosted
version: "4.0.0"
version: "5.0.0"
logging:
dependency: transitive
description:
Expand Down
2 changes: 1 addition & 1 deletion das_client/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ dev_dependencies:
# activated in the `analysis_options.yaml` file located at the root of your
# package. See that file for information about deactivating specific lint
# rules and activating additional ones.
flutter_lints: ^4.0.0
flutter_lints: ^5.0.0
flutter_launcher_icons: ^0.14.0

# For information on the generic Dart part of this file, see the
Expand Down
1 change: 1 addition & 0 deletions das_client/test/logging/logging_service_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ void main() {
Fimber.plantTree(DebugTree());
PathProviderPlatform.instance = MockPathProviderPlatform();
logDirectory = Directory("${(await getApplicationSupportDirectory()).path}/logs");
logDirectory.createSync(recursive: true);
logDirectory.listSync().forEach((element) {
element.deleteSync();
});
Expand Down

0 comments on commit b072e81

Please sign in to comment.