Esempio n. 1
0
        /// <summary>
        /// Create a fresh test app with the given name, delete the existing
        /// test app and reboot Splunk.
        /// </summary>
        /// <param name="name">The app name</param>
        public static async Task <Application> RecreateAsync(this ApplicationCollection applications, string name)
        {
            var app = await applications.GetOrNullAsync(name);

            if (app != null)
            {
                await app.RemoveAsync();
            }

            await applications.CreateAsync(name, "sample_app");

            app = await applications.GetOrNullAsync(name);

            Assert.NotNull(app);

            return(app);
        }