| // Copyright 2023 The Fuchsia Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| library fuchsia.archivist.test; |
| |
| using fuchsia.testing.harness; |
| using fuchsia.component; |
| |
| /// Subset of Archivist configuration relevant to some test cases. |
| type ArchivistConfig = table { |
| /// Whether Archivist will be reading the Klog and forwarding it to Syslog |
| /// or not. |
| 1: enable_klog bool; |
| |
| /// The size of the log buffer that Archivist stores. |
| 2: logs_max_cached_original_bytes uint64; |
| |
| /// The path to the Pipelines configuration in Archivist namespace. |
| 3: pipelines_path string:256; |
| }; |
| |
| type PuppetDecl = table { |
| /// The child name this puppet should have in the test realm. |
| 1: name fuchsia.component.child_name; |
| }; |
| |
| /// RealmOptions tells the RealmFactory protocol how to create the test realm. |
| type RealmOptions = table { |
| /// Optional name to give to the realm component. |
| /// This will become part of the realm's component selector. |
| 1: realm_name fuchsia.component.name; |
| |
| /// A set of puppets to add to the realm. |
| /// |
| /// When RealmFactory/CreateRealm is called, a puppet component will be added |
| /// to the test realm for each name specified here, but will not be started |
| /// until a client connects to its exposed Puppet protocol. |
| 2: puppets vector<PuppetDecl>:MAX; |
| |
| /// Selector for which configuration of archivist to use. |
| 3: archivist_config ArchivistConfig; |
| }; |
| |
| /// The test realm factory protocol for archivist integration tests. |
| /// |
| /// This protocol allows clients to build an archivist component in a hermetic |
| /// test realm that also includes several "puppet" components. |
| /// |
| /// For full documentation see //src/diagnostics/testing/realm-factory/README.md. |
| @discoverable |
| open protocol RealmFactory { |
| /// Specifies the options to use when creating the realm. |
| /// |
| /// Returns OperationError.INVALID if called more than once. |
| flexible CreateRealm(resource struct { |
| options RealmOptions; |
| realm_server server_end:fuchsia.testing.harness.RealmProxy; |
| }) -> () error fuchsia.testing.harness.OperationError; |
| }; |