// SPDX-License-Identifier: Apache-2.0
/**
 * Represents the options to use when testing a chart.
 *
 * @property filter - Specify tests by attribute (currently "name") using attribute=value syntax or '!attribute=value' to
 *                   exclude a test (can specify multiple or separate values with commas: name=test1,name=test2)
 * @property timeout - Time to wait for any individual Kubernetes operation (like Jobs for hooks) (default 5m0s)
 */
export class TestChartOptions {
    filter;
    timeout;
    namespace;
    /**
     * Creates a new instance of TestChartOptions.
     * @param filter - The test filter
     * @param timeout - The operation timeout
     * @param namespace
     */
    constructor(filter, timeout, namespace) {
        this.filter = filter;
        this.timeout = timeout;
        this.namespace = namespace;
    }
    /**
     * Applies the options to the given builder.
     * @param builder The builder to apply the options to
     */
    apply(builder) {
        if (this.filter?.trim()) {
            builder.argument('filter', this.filter.trim());
        }
        if (this.timeout?.trim()) {
            builder.argument('timeout', this.timeout.trim());
        }
        if (this.namespace?.trim()) {
            builder.argument('namespace', this.namespace.trim());
        }
    }
}
//# sourceMappingURL=test-chart-options.js.map